/*
--------------------------------------------------------------------------------
	This do file creates Tables S3 and S4 from the Supplementary Information of the paper
	"Lies in politics: A study of politicians' preferences for truth-telling".
	Before running this do file, readers should update the directory below 
	called "Home" to where the "ReplicationPackage" folder is located.
	
	Please note that due to standardization of the variables age,
	log population size and rounding of the variable margin2015, there is slight
	deviation in the decimals of the coefficients. 
	
	Paper: "Lies in politics: A study of politicians' preferences for truth-telling"
	Authors: Katharina A. Janezic, Aina Gallego
	Corresponding author: Aina Gallego, agallego@ibei.org
	
	Last changed: June 6, 2020
--------------------------------------------------------------------------------
*/

*----- 0: Housekeeping
clear all
version 13
set more off

*------------------------------------------------------------------------------*
/* PLEASE UPDATE THE DIRECTORY HERE */
/* For Mac Users */
//cd "Users/.../Replication/code"

/* For Windows Users */
//cd "C:\...\Replication\code"
*------------------------------------------------------------------------------*


*------------------------------------------------------------------------------*
*----- 0: Load data
use "./dataRepl.dta", replace

*----- subsample used
drop if interestreport==. //5 observations
drop if honestytime_cutoff==1 //spent less or equal to 5 seconds on answering honesty question


*------------------------------------------------------------------------------*
*---- 1: Regressions Table S3

*** Vary restriction on timing ***

*** Table S3(1)
preserve
quietly drop if honestytime_cutoff>=2 //spent more than 85 seconds on answering honesty question 
quietly reg iscara interestreportYes gender isMajorParty pop_log age margin2015
eststo robust1
restore

*** Table S3(2)
preserve
quietly drop if honestytime_cutoff>=4 //spent more than 95 seconds on answering honesty question 
quietly reg iscara interestreportYes gender isMajorParty pop_log age margin2015
eststo robust2
restore

*** Table S3(3)
preserve
quietly reg iscara interestreportYes gender isMajorParty pop_log age margin2015
eststo robust3
restore

*** Display and Export Table
esttab robust*, label se b(2) starlevels( * 0.10 ** 0.05 *** 0.01) mtitles("Rep. Heads" "Rep. Heads" "Rep. Heads")
esttab robust* using tableS3.tex, replace label se b(2) starlevels( * 0.10 ** 0.05 *** 0.01) mtitles("Rep. Heads" "Rep. Heads" "Rep. Heads")


*------------------------------------------------------------------------------*
*---- 2: Regressions Table S4

*** Table S4(1)
preserve
quietly drop if honestytime_cutoff>=2 //spent more than 85 seconds on answering honesty question 
quietly reg reelected iscara ranagain margin2015 gender pop_log c.margin2015#iscara b2.party
eststo reelrobust1
restore 

*** Table S4(2)
preserve
quietly drop if honestytime_cutoff>=4 //spent more than 95 seconds on answering honesty question 
quietly reg reelected iscara ranagain margin2015 gender pop_log c.margin2015#iscara b2.party
eststo reelrobust2
restore

*** Table S4(3)
preserve
quietly reg reelected iscara ranagain margin2015 gender pop_log c.margin2015#iscara b2.party
eststo reelrobust3
restore

*** Display and Export Table
esttab reelrobust*, label se b(2) starlevels( * 0.10 ** 0.05 *** 0.01) mtitles("Reelected" "Reelected" "Reelected")
esttab reelrobust* using tableS4.tex, replace label se b(2) starlevels( * 0.10 ** 0.05 *** 0.01) mtitles("Reelected" "Reelected" "Reelected")

